package com.shuoyue.ycgk.net.api;

import com.ahammertest.ycgk.wxapi.WxPayBean;
import com.shuoyue.ycgk.base.BaseResult;
import com.shuoyue.ycgk.base.ListWithPage;
import com.shuoyue.ycgk.entity.AppVersionInfo;
import com.shuoyue.ycgk.entity.Cert;
import com.shuoyue.ycgk.entity.Coupon;
import com.shuoyue.ycgk.entity.Course;
import com.shuoyue.ycgk.entity.CourseInfo;
import com.shuoyue.ycgk.entity.DayTaget;
import com.shuoyue.ycgk.entity.DealLessonInfo;
import com.shuoyue.ycgk.entity.Estimate;
import com.shuoyue.ycgk.entity.EstimateHis;
import com.shuoyue.ycgk.entity.FreedomGroup;
import com.shuoyue.ycgk.entity.FreedomSet;
import com.shuoyue.ycgk.entity.HotSearch;
import com.shuoyue.ycgk.entity.JobHis;
import com.shuoyue.ycgk.entity.JobInfo;
import com.shuoyue.ycgk.entity.LessonProcess;
import com.shuoyue.ycgk.entity.MainAdv;
import com.shuoyue.ycgk.entity.MokType;
import com.shuoyue.ycgk.entity.MouthInfo;
import com.shuoyue.ycgk.entity.MyBanner;
import com.shuoyue.ycgk.entity.Mok;
import com.shuoyue.ycgk.entity.News;
import com.shuoyue.ycgk.entity.NewsType;
import com.shuoyue.ycgk.entity.Order;
import com.shuoyue.ycgk.entity.Paper;
import com.shuoyue.ycgk.entity.PaperSet;
import com.shuoyue.ycgk.entity.PersonNote;
import com.shuoyue.ycgk.entity.QuestionNote;
import com.shuoyue.ycgk.entity.QuestionParent;
import com.shuoyue.ycgk.entity.QuestionSimple;
import com.shuoyue.ycgk.entity.RecruitmentItem;
import com.shuoyue.ycgk.entity.RecruitmentItemHis;
import com.shuoyue.ycgk.entity.RecruitmentMainInfo;
import com.shuoyue.ycgk.entity.Resume;
import com.shuoyue.ycgk.entity.Rule;
import com.shuoyue.ycgk.entity.ShopCarBean;
import com.shuoyue.ycgk.entity.ShopInfo;
import com.shuoyue.ycgk.entity.ShopItem;
import com.shuoyue.ycgk.entity.SourtInfo;
import com.shuoyue.ycgk.entity.TodayCourseInfo;
import com.shuoyue.ycgk.entity.TodayQuestionInfo;
import com.shuoyue.ycgk.entity.Unit;
import com.shuoyue.ycgk.entity.UploadEstimateSucInfo;
import com.shuoyue.ycgk.entity.UserTestPaper;
import com.shuoyue.ycgk.entity.SpecialType;
import com.shuoyue.ycgk.entity.TimerTable;
import com.shuoyue.ycgk.entity.Type;
import com.shuoyue.ycgk.entity.UserAnswerPager;
import com.shuoyue.ycgk.entity.UserInfo;
import com.shuoyue.ycgk.entity.VipPrice;
import com.shuoyue.ycgk.entity.VipPurchased;
import com.shuoyue.ycgk.entity.VipType;
import com.shuoyue.ycgk.entity.ChapterType;
import com.shuoyue.ycgk.entity.WelcomeBean;
import com.shuoyue.ycgk.entity.address.AddressBean;
import com.shuoyue.ycgk.entity.address.OrderAddressBean;
import com.shuoyue.ycgk.ui.papergroups.running.myrush.RushBean;
import com.shuoyue.ycgk.ui.pay.OrderNo;
import com.shuoyue.ycgk.ui.pay.OrderPriceInfo;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

public interface APIService {

    //<editor-folder desc="公共">

    /**
     * 下载文件
     */
    /**
     * 下载文件用
     *
     * @param fileUrl
     * @return
     */
    @Streaming //添加这个注解用来下载大文件
    @GET()
    Call<ResponseBody> downloadFileUrl(@Url String fileUrl);

    @POST("/api/index/search/is-vip")
    @FormUrlEncoded
    Observable<BaseResult<Integer>> checkVip(@Field("moduleId") int moduleId);

    /**
     * 获取模块
     * 基础三个模块id传  11
     *
     * @return
     */
    @POST("/api/module/list")
    @FormUrlEncoded
    Observable<BaseResult<List<Type>>> moduleList(@Field("id") int id);

    /**
     * 上传文件
     */
    @Multipart
    @POST("/api/file/uploadImg")
    Observable<BaseResult<String>> uploadFile(@Part MultipartBody.Part file);
    //</editor-folder >

    //<editor-folder desc="首页">


    /**
     * 首页banner
     * api/index/get-banner
     *
     * @return
     */
    @POST("api/index/get-banner")
    @FormUrlEncoded
    Observable<BaseResult<List<MyBanner>>> getHomeBanners(@Field("moduleId") int id);

    /**
     * 首页b模考
     *
     * @return
     */
    @POST("api/index/get-home-mock")
    @FormUrlEncoded
    Observable<BaseResult<List<Mok>>> getHomeMock(
            @Field("subjectId") int subjectId);

    /**
     * 首页精品课程
     *
     * @return
     */
    @POST("/api/course/getGoodsCourseList")
    @FormUrlEncoded
    Observable<BaseResult<List<Course>>> getGoodsCourseList(
            @Field("moduleName") String moduleName);


    /**
     * 首页今日目标
     *
     * @return
     */
    @POST("/api/index/get-target")
    @FormUrlEncoded
    Observable<BaseResult<List<Course>>> getTodayTaget(@Field("ph") int id);

    /**
     * 搜索题目
     *
     * @return
     */
    @POST("/api/index/search")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<QuestionSimple>>> searchQuestion(@Field("searchType") String searchType,
                                                                        @Field("keywords") String keywords,
                                                                        @Field("moduleId") int moduleId,
                                                                        @Field("n") int n);

    //</editor-folder >

    //<editor-folder desc="课程">

    /**
     * 获取课程列表
     *
     * @return
     */
    @POST("/api/course/getCourseListForApp")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<Course>>> getCourseList(
            @Field("moduleId") Integer moduleId,
            @Field("subjectId") Integer subjectId,
            @Field("n") Integer n);

    /**
     * 获取课程信息
     *
     * @return
     */
    @POST("/api/course/getCourseInfoApp")
    @FormUrlEncoded
    Observable<BaseResult<CourseInfo>> getCourseInfo(@Field("id") int id);

    /**
     * 获取视频信息
     *
     * @return
     */
    @POST("api/course/play-arrangement-video")
    @FormUrlEncoded
    Observable<BaseResult<TimerTable>> getVideoInfo(@Field("id") int id);

    /**
     * 统计学习时间
     *
     * @return
     */
    @POST("/api/memberLearnTime/set-learn-time")
    @FormUrlEncoded
    Observable<BaseResult<String>> setLearnTime(@Field("actionId") int actionId,//课程ID
                                                @Field("lasts") int lasts,//时间秒
                                                @Field("moduleId") Integer moduleId,//null
                                                @Field("type") int type, //1视频,2模考
                                                @Field("argId") int argId);

    /**
     * 获取我的课程
     *
     * @return
     */
    @POST("/api/member/course/list-app")
//    @FormUrlEncoded
    Observable<BaseResult<List<Course>>> getMyCourse();

    /**
     * 获取我的失效课程
     *
     * @return
     */
    @POST("/api/member/course/valid/list")
    Observable<BaseResult<List<Course>>> getMyInvalidateCourse();

    /**
     * 获取全部课程、免费课程
     *
     * @return
     */
    @POST("/api/course/pay-free-course")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<Course>>> getAllCourse(@Field("type") Integer type,
                                                              @Field("moduleId") Integer moduleId,
                                                              @Field("n") Integer n);

    /**
     * 协议班报名
     *
     * @param userName
     * @param phone
     * @param days
     * @return
     */

    @POST("/api/appointment/add-appointment")
    @FormUrlEncoded
    Observable<BaseResult<String>> registSpecialCourse(@Field("userName") String userName,
                                                       @Field("phone") String phone,
                                                       @Field("days") String days,
                                                       @Field("typeStr") String typeStr);

    //</editor-folder >

    //<editor-folder desc="专项训练">

    /**
     * 获取首页专项训练列表
     *
     * @return
     */
    @POST("/api/special/question/exercise/homeGuide")
    @FormUrlEncoded
    Observable<BaseResult<List<SpecialType>>> getHomeSpecialList(@Field("moduleId") Integer moduleId,
                                                                 @Field("subjectId") Integer subjectId
    );

    /**
     * 获取专项训练列表
     *
     * @return
     */
    @POST("/api/special/question/exercise/guide")
    @FormUrlEncoded
    Observable<BaseResult<List<SpecialType>>> getSpecialList(@Field("moduleId") int moduleId,
                                                             @Field("subjectId") int subjectId);

    /**
     * 创建专项试卷
     *
     * @return
     */
    @POST("api/special/question/to-exercise")
    @FormUrlEncoded
    Observable<BaseResult<UserTestPaper>> createSpecialPager1(@Field("moduleId") int moduleId,
                                                              @Field("papername") String papername);


    //</editor-folder >

    //<editor-folder desc="真题试卷">

    /**
     * 获取真题试卷(组)列表
     *
     * @return
     */
    Observable<BaseResult<String>> getQuestionSetList();

    /**
     * 获取真题试卷列表
     *
     * @return
     */
    Observable<BaseResult<String>> getQuestionPaperList();

    /**
     * 题试卷题目
     *
     * @return
     */
    Observable<BaseResult<String>> getQuestions(int pagerId);

    /**
     * 真题试卷提交答案
     *
     * @return
     */
    Observable<BaseResult<String>> uploadPaperUserAnswer();
    //</editor-folder >

    //<editor-folder desc="模考">

    /**
     * 获取模考一级列表
     *
     * @return
     */
    @POST("/api/model/competition/app/mock-first-list")
    Observable<BaseResult<List<MokType>>> getMokTypeList();

    /**
     * 获取模考列表
     *
     * @return
     */
    @POST("/api/model/competition/app/mock-second-list")
    @FormUrlEncoded
    Observable<BaseResult<List<Mok>>> getMokList(@Field("subjectTypeId") Integer subjectId);

    /**
     * 获取我的模考列表
     *
     * @return
     */
    @POST("/api/model/competition/app/member/mock/list")
    Observable<BaseResult<List<Mok>>> getMyMok();

    /**
     * 获取模考详情
     *
     * @return
     */
    @POST("/api/model/competition/app/mock-third-detail")
    @FormUrlEncoded
    Observable<BaseResult<Mok>> getMokInfo(@Field("mockId") int id);

    /**
     * 报名
     *
     * @param id
     * @return
     */
    @POST("/api/model/competition/sign-up")
    @FormUrlEncoded
    Observable<BaseResult<String>> registMok(@Field("id") int id);


    @POST("/api/model/competition/app/mock-score-list")
    @FormUrlEncoded
    Observable<BaseResult<SourtInfo>> getMokSourt(@Field("mockId") Integer mokId, @Field("n") int n);


    //</editor-folder >

    //<editor-folder desc="资讯">


    /**
     * 资讯分类
     *
     * @return
     */
    @POST("/api/information/getTypeList")
    @FormUrlEncoded
    Observable<BaseResult<List<NewsType>>> infomationType(@Field("questionType") Integer type);

    /**
     * 资讯列表
     *
     * @return
     */
    @POST("/api/information/getListForApp")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<News>>> informationList(@Field("moduleId") Integer moduleId,
                                                               @Field("n") Integer n,
                                                               @Field("type") Integer type,
                                                               @Field("keywords") String keywords);

    /**
     * 资讯详情
     *
     * @return
     */
    @POST("/api/information/getDetails")
    @FormUrlEncoded
    Observable<BaseResult<News>> information(@Field("id") int id);

    //</editor-folder >

    //<editor-folder desc="商城">


    /**
     * 图书列表
     *
     * @return
     */
    @POST("/api/book/getBookList")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<ShopItem>>> booksList(@Field("moduleId") Integer moduleId,
                                                             @Field("n") Integer n);

    /**
     * 图书详情
     *
     * @return
     */
    @POST("/api/book/getBookInfo")
    @FormUrlEncoded
    Observable<BaseResult<ShopInfo>> booksInfo(@Field("id") int id);

    /**
     * 加入购物车
     *
     * @return
     */
    @POST("/api/cart/add-shopping-cart")
    @FormUrlEncoded
    Observable<BaseResult<String>> addShoppingcar(@Field("productId") int id);

    /**
     * 购物车列表
     *
     * @return
     */
    @POST("/api/cart/list")
    Observable<BaseResult<List<ShopCarBean>>> queryShoppingCarList();

    /**
     * 购物车删除
     *
     * @return
     */
    @POST("/api/cart/remove-shopping-cart")
    @FormUrlEncoded
    Observable<BaseResult<String>> deleteShoppingCar(@Field("id") String id);

    /**
     * 购物车修改数量
     *
     * @return
     */
    @POST("/api/cart/edit-shopping-cart")
    @FormUrlEncoded
    Observable<BaseResult<Object>> updateShoppingCarByCount(@Field("id") int id,
                                                            @Field("num") int num);

    //</editor-folder >


    //<editor-folder desc="计划/目标">

    /**
     * 目标概览
     *
     * @return
     */
    @POST("/api/index/get-target")
    @FormUrlEncoded
    Observable<BaseResult<DayTaget>> tagetByDay(
            @Field("moduleId") int moduleId,
            @Field("targetDate") String targetDate);

    /**
     * 创建目标
     *
     * @return
     */

    @POST("/api/member/update-user-target")
    @FormUrlEncoded
    Observable<BaseResult<String>> setDayTaget(
            @Field("moduleId") int moduleId,
            @Field("setAccuracyNum") int setAccuracyNum,
            @Field("setMinuteNum") int setMinuteNum,
            @Field("setQuestionNum") int setQuestionNum);

    /**
     * 用户模块学习进度<我的-学习进度></>
     *
     * @return
     */
    @POST("/api/member/get-learn-process")
    @FormUrlEncoded
    Observable<BaseResult<LessonProcess>> getLearnProcess(
            @Field("moduleId") Integer subjectId
    );

    /**
     * 协议班学习进度
     *
     * @return
     */
    @POST("/api/member/get-agreement-learn-process")
    @FormUrlEncoded
    Observable<BaseResult<DealLessonInfo>> getDealLearnProcess(@Field("memberId") Integer memberId,
                                                               @Field("subjectId") Integer subjectId,
                                                               @Field("targetDate") String targetDate);

    //</editor-folder >

    //<editor-folder desc="账号">

    @POST("/api/member/to-login-app")
    @FormUrlEncoded
    Observable<BaseResult<UserInfo>> login(@Field("phone") String phone,
                                           @Field("password") String password,
                                           @Field("deviceId") String deviceId,
                                           @Field("deviceName") String deviceName);

    @POST("/api/member/to-login-verify")
    @FormUrlEncoded
    Observable<BaseResult<UserInfo>> loginSms(@Field("phone") String phone,
                                              @Field("verifyCode") String password,
                                              @Field("deviceId") String deviceId,
                                              @Field("deviceName") String deviceName);

    @POST("/api/member/to-login-plus")
    @FormUrlEncoded
    Observable<BaseResult<UserInfo>> oneKeyLogin(@Field("token") String token);

    @POST("/api/app/wechat/login")
    @FormUrlEncoded
    Observable<BaseResult<UserInfo>> wechatLogin(@Field("openid") String openId,
                                                 @Field("accessToken") String accessToken,
                                                 @Field("deviceId") String deviceId,
                                                 @Field("deviceName") String deviceName);

    @POST("/api/member/to-register")
    @FormUrlEncoded
    Observable<BaseResult<String>> regist(@Field("phone") String phone,
                                          @Field("password") String password,
                                          @Field("code") String code);

    @POST("/api/member/to-forget-pass")
    @FormUrlEncoded
    Observable<BaseResult<String>> findBackPwd(@Field("phone") String phone,
                                               @Field("newpassword") String newpassword,
                                               @Field("repassword") String repassword,
                                               @Field("code") String code);

    @POST("/api/member/to-change-pass")
    @FormUrlEncoded
    Observable<BaseResult<String>> updatePwd(@Field("oldpassword") String oldpassword,
                                             @Field("newpassword") String newpassword,
                                             @Field("repassword") String repassword);

    @POST("/api/sms/send")
    @FormUrlEncoded
    Observable<BaseResult<String>> smsSend(@Field("phone") String phone);

    /**
     * 绑定手机号码
     */
    @POST("/api/app/wechat/wechatBind")
    @FormUrlEncoded
    Observable<BaseResult<UserInfo>> bindPhone(@Field("openId") String openId,
                                               @Field("accessToken") String accessToken,
                                               @Field("phone") String phone,
                                               @Field("smsCode") String smsCode,
                                               @Field("deviceId") String deviceId,
                                               @Field("deviceName") String deviceName);

    /**
     * 注销账号
     *
     * @param smsCode
     * @return
     */
    @POST("/api/member/logOff")
    @FormUrlEncoded
    Observable<BaseResult<String>> unregist(
            @Field("verifyCode") String smsCode);

    //</editor-folder >


    //<editor-folder desc="错题">
    @POST("/api/member/wrong/questionForApp")
    @FormUrlEncoded
    Observable<BaseResult<List<ChapterType>>> getWrongTypes(@Field("moduleId") int moduleId);

    @POST("/api/member/wrong/question/to-exercise-app")
    @FormUrlEncoded
    Observable<BaseResult<List<QuestionParent>>> getWrongQuestions(@Field("sectionId") Integer sectionId,
                                                                   @Field("consolidate") Integer type);


    @POST("/api/member/wrong/question/consolidate")
    @FormUrlEncoded
    Observable<BaseResult<String>> consolidate(@Field("memberPaperDetailId") int memberPaperDetailId,
                                               @Field("status") int status);

    @POST("/api/member/wrong/question/batch-remove")
    @FormUrlEncoded
    Observable<BaseResult<String>> deleteWrongType(
            @Field("chapterId") Integer chapterId,
            @Field("sectionId") Integer sectionId);

    @POST("/api/member/wrong/question/remove-all")
    @FormUrlEncoded
    Observable<BaseResult<String>> deleteAllWrong(
            @Field("moduleId") Integer moduleId
    );

    //</editor-folder >

    //<editor-folder desc="地址">
    @POST("/api/member/getAddressList")
    Observable<BaseResult<List<OrderAddressBean>>> queryAddressList();

    @POST("/api/member/delete-address")
    @FormUrlEncoded
    Observable<BaseResult<String>> deleteAddresss(@Field("id") int id);

    @POST("/api/member/save-address")
    @FormUrlEncoded
    Observable<BaseResult<String>> editAddress(@Field("id") Integer id,
                                               @Field("provinceName") String provinceName,
                                               @Field("cityName") String cityName,
                                               @Field("regionName") String regionName,
                                               @Field("address") String address,
                                               @Field("contact") String contact,
                                               @Field("phone") String phone,
                                               @Field("isDefault") int isDefault,
                                               @Field("provinceId") int provinceId,
                                               @Field("cityId") int cityId,
                                               @Field("regionId") int regionId);

    @POST("/api/member/getAddressInfo")
    @FormUrlEncoded
    Observable<BaseResult<OrderAddressBean>> getAddressInfo(@Field("addressId") int addressId);

    /**
     * 系统地址选择
     *
     * @return
     */
    @POST("/api/china/list")
    @FormUrlEncoded
    Observable<BaseResult<List<AddressBean>>> getSysRegionList(@Field("pid") int pid);


    /**
     * 系统地址选择(全部）
     */
    @POST("/api/china/all")
    Observable<BaseResult<List<List<String>>>> getAllSystemAddress();

    //</editor-folder >


    //<editor-folder desc="题目笔记">
    @POST("/api/member/submit-question-notes")
    @FormUrlEncoded
    Observable<BaseResult<String>> saveNote(@Field("questionId") int questionId,
                                            @Field("notes") String notes);

    @POST("/api/member/notes/get-by-question")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<QuestionNote>>> getQuestionNotes(@Field("questionId") int questionId,
                                                                        @Field("n") int page);


    @POST("/api/member/like/count")
    @FormUrlEncoded
    Observable<BaseResult<String>> praiseNote(@Field("actionId") int questionId,
                                              @Field("isAdd") int isAdd);

    @POST("/api/member/notes/get-question-notes-app")
    @FormUrlEncoded
    Observable<BaseResult<List<ChapterType>>> getUserNoteType(@Field("moduleId") int moduleId, @Field("like") int like);

    @POST("/api/member/notes/get-questions")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<PersonNote>>> getUserNoteQUestion(@Field("sectionId") Integer sectionId, @Field("like") int like, @Field("n") int n);

    @POST("/api/member/notes/get-questions-list")
    @FormUrlEncoded
    Observable<BaseResult<List<PersonNote>>> getUserNoteQUestion(@Field("sectionId") Integer sectionId,
                                                                 @Field("like") int like
    );

    @POST("/api/special/question/get-question-by-id")
    @FormUrlEncoded
    Observable<BaseResult<List<QuestionParent>>> getQuestionInfo(@Field("questionId") int questionId);

    //</editor-folder >

    //<editor-folder desc="Vip">
    @POST("/api/member/vip/list")
    Observable<BaseResult<List<VipType>>> getVipTypes();

    @POST("/api/member/vip/price/list")
    @FormUrlEncoded
    Observable<BaseResult<List<VipPrice>>> getVipPrice(@Field("subjectTypeId") int subjectTypeId);

    @POST("/api/member/vip/check")
    @FormUrlEncoded
    Observable<BaseResult<Integer>> checkVipStatue(@Field("subjectTypeId") int subjectTypeId);

    @POST("/api/member/get-vip-list")
    Observable<BaseResult<List<VipPurchased>>> getVipPurchased();

    //</editor-folder >

    //<editor-folder desc="收藏">
    @POST("/api/member/collect/question/guide-app")
    @FormUrlEncoded
    Observable<BaseResult<List<ChapterType>>> getCollectionType(@Field("moduleId") int moduleId);

    @POST("/api/member/collect/question/to-exercise-app")
    @FormUrlEncoded
    Observable<BaseResult<List<QuestionParent>>> getCollectionQuestion(@Field("sectionId") Integer sectionId);

    /**
     * 添加收藏
     *
     * @param collectType 收藏类型（1：题目收藏，2：课程收藏等等,3题包）
     * @return
     */
    @POST("/api/member/to-collect")
    @FormUrlEncoded
    Observable<BaseResult<String>> saveCollect(@Field("collectId") int collectId, @Field("collectType") int collectType);

    /**
     * 取消收藏
     *
     * @return
     */
    @POST("/api/member/cancel-collect")
    @FormUrlEncoded
    Observable<BaseResult<String>> deleteCollection(@Field("collectId") int collectId, @Field("collectType") int collectType);
    //</editor-folder >

    //<editor-folder desc="题集">

    /**
     * @param isHome   是否首页1是,其他否
     * @param moduleId
     * @param title    搜索传入标题
     * @param type     类型:1真题,
     * @return
     */
    @POST("/api/topic/list")
    @FormUrlEncoded
    Observable<BaseResult<List<PaperSet>>> getPaperSetList(@Field("isHome") Integer isHome,
                                                           @Field("moduleId") Integer moduleId,
                                                           @Field("title") String title,
                                                           @Field("type") Integer type);

    /**
     * 时政热点
     */
    @POST("/api/topic/list")
    @FormUrlEncoded
    Observable<BaseResult<List<PaperSet>>> getPaperSetHotList(
            @Field("subjectTypeId") Integer moduleId,
            @Field("type") Integer type);

    /**
     * 真题详情
     *
     * @param topicId
     * @return
     */
    @POST("/api/topic/getInfo")
    @FormUrlEncoded
    Observable<BaseResult<PaperSet>> getPaperSetInfo(@Field("topicId") int topicId);

    /**
     * 所有冲刺
     *
     * @param moduleId
     * @return
     */
    @POST("/api/test/paper/rush/app/info")
    @FormUrlEncoded
    Observable<BaseResult<PaperSet>> getRushInfo(@Field("moduleId") int moduleId);

    /**
     * 用户冲刺
     *
     * @return
     */
    @POST("/api/member/rush/paper/list")
    Observable<BaseResult<List<RushBean>>> getRushList();

    @POST("/api/topic/list")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<PaperSet>>> getReals(@Field("areaId") Integer areaId,
                                                            @Field("testPaperId") int moduleId,
                                                            @Field("n") Integer n,
                                                            @Field("year") Integer year);

    /**
     * 我的考前冲刺
     *
     * @return
     */
    @POST("/api/order/get-order-info")
    Observable<BaseResult<List<PaperSet>>> getMySets();


    /**
     * 生成考前冲刺个人试卷
     */
    @POST("/api/test/paper/rush/info")
    @FormUrlEncoded
    Observable<BaseResult<UserTestPaper>> createRushPaper(@Field("testPaperId") int testPaperId);

    /**
     * 生成考前冲刺个人试卷
     */
    @POST("/api/topic/getTopicTest")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<Paper>>> getTopicPaper(@Field("topicId") int topicId,
                                                              @Field("title") String title,
                                                              @Field("n") int page);


    //<editor-folder desc="招考公告">

    /**
     * 招考公告首页信息
     *
     * @param i
     * @param modelId
     * @return
     */
    @POST("/api/examination/get-notice-home")
    @FormUrlEncoded
    Observable<BaseResult<RecruitmentMainInfo>> getNoticeMain(@Field("n") int i,
                                                              @Field("moduleId") Integer modelId);

    /**
     * 招考公告详情
     *
     * @param id
     * @return
     */
    @POST("/api/examination/get-notice-detail")
    @FormUrlEncoded
    Observable<BaseResult<RecruitmentItem>> getRecurimentInfo(@Field("examId") int id);

    /**
     * 招考公告职位,依附于某个公告
     *
     * @param examId 公告ID (不传查所有)
     * @param page
     * @param title
     * @return
     */
    @POST("/api/examination/get-notice-post-search")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<JobInfo>>> getRecJobs(
            @Field("moduleId") Integer moduleId,
            @Field("examId") Integer examId,
            @Field("n") int page,
            @Field("title") String title);

    /**
     * 招考公告列表
     *
     * @return
     */
    @POST("/api/examination/get-notice-list")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<RecruitmentItem>>> getRecurimentList(
            @Field("moduleId") Integer moduleId,
            @Field("n") int page);

    /**
     * 公告关注
     *
     * @return
     */
    @POST("/api/examination/get-notice-history")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<RecruitmentItem>>> getFocusRecruiment(@Field("historyType") Integer historyType,
                                                                             @Field("noticeType") int noticeType,
                                                                             @Field("n") int n);


    /**
     * 职位关注/
     *
     * @return
     */
    @POST("/api/examination/get-notice-history")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<JobInfo>>> getFocusJob(@Field("historyType") Integer historyType,
                                                              @Field("noticeType") int noticeType,
                                                              @Field("n") int n);


    /**
     * 公告历史
     *
     * @return
     */
    @POST("/api/examination/get-notice-history")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<RecruitmentItemHis>>> getHisRecruiment(@Field("historyType") Integer historyType,
                                                                              @Field("noticeType") int noticeType,
                                                                              @Field("n") int n);


    /**
     * 职位历史
     *
     * @return
     */
    @POST("/api/examination/get-notice-history")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<JobHis>>> getHisJob(@Field("historyType") Integer historyType,
                                                           @Field("noticeType") int noticeType,
                                                           @Field("n") int n);

    /**
     * 关注状态改变
     *
     * @return
     */
    @POST("/api/examination/collection-notice-post")
    @FormUrlEncoded
    Observable<BaseResult<String>> collectionNotice(@Field("id") Integer id,
                                                    @Field("type") int type,
                                                    @Field("actionType") int actionType);

    /**
     * 职位公告详情
     *
     * @param postId
     * @return
     */
    @POST("/api/examination/get-notice-post-detail")
    @FormUrlEncoded
    Observable<BaseResult<JobInfo>> getJobInfo(@Field("postId") int postId);


    //</editor-folder >

    //<editor-folder desc="订单">

    /**
     * 获取订单价格信息
     */
    @POST("/api/order/compute")
    @FormUrlEncoded
    Observable<BaseResult<OrderPriceInfo>> getPreOrderPrice(@Field("productId") int productId,
                                                            @Field("productNum") int productNum,
                                                            @Field("productPriceId") int productPriceId,
                                                            @Field("productType") int productType,
                                                            @Field("addressId") Integer addressId,
                                                            @Field("couponId") String couponId);

    /**
     * 获取订单价格信息
     */
    @POST("/api/order/submit-order")
    @FormUrlEncoded
    Observable<BaseResult<OrderNo>> submitOrder(@Field("productId") int productId,
                                                @Field("productNum") int productNum,
                                                @Field("productPriceId") int productPriceId,
                                                @Field("productType") int productType,
                                                @Field("payType") int payType,
                                                @Field("addressId") Integer addressId,
                                                @Field("couponId") String couponId,
                                                @Field("remark") String remark);


    //</editor-folder >


    //<editor-folder desc="搜索">

    /**
     * 热搜列表
     */
    @POST("/api/hotSearch/list")
    @FormUrlEncoded
    Observable<BaseResult<List<HotSearch>>> searchHot(@Field("moduleId") Integer moduleId,
                                                      @Field("type") int type);

    /**
     * 搜招考公告
     */
    @POST("/api/examination/search-notice")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<RecruitmentItem>>> searchRecuriment(@Field("keywords") String keywords,
                                                                           @Field("n") int n);

    /**
     * 热点资讯
     */
    @POST("/api/information/search-information")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<News>>> searchInformation(@Field("keywords") String keywords,
                                                                 @Field("moduleId") int moduleId,
                                                                 @Field("n") int n);

    /**
     * 课程搜索
     */
    @POST("/api/course/course-search")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<Course>>> searchCourse(@Field("keywords") String keywords,
                                                              @Field("moduleId") int moduleId,
                                                              @Field("n") int n);


    /**
     * 图书搜索
     */
    @POST("/api/book/bookSearch")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<ShopItem>>> searchBook(@Field("keywords") String keywords,
                                                              @Field("moduleId") int moduleId,
                                                              @Field("n") int n);


    @POST("/api/topic/topic-search")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<PaperSet>>> searchRealPaper(@Field("title") String keywords,
                                                                   @Field("type") int moduleId,
                                                                   @Field("n") int n );
    //</editor-folder >

    /**
     * 成功邀请个数
     *
     * @return
     */
    @POST("/api/member/get-invite-person")
    Observable<BaseResult<Integer>> getInviteNum();

    //<editor-folder desc="自由组卷">
    //


    /**
     * 获取自由组卷类型列表
     *
     * @param modelId
     * @return
     */
    @POST("/api/free/question/get-type-list")
    @FormUrlEncoded
    Observable<BaseResult<FreedomSet>> getFreedomPaper(@Field("moduleId") int modelId);

    //</editor-folder >

    //<editor-folder desc="订单">

    @POST("/api/member/update-profile")
    @FormUrlEncoded
    Observable<BaseResult<String>> updateUserInfo(@Field("nickName") String nick,
                                                  @Field("headImg") String head);

    /**
     * 订单列表
     *
     * @param receiptStatus
     * @param type
     * @return
     */
    @POST("/api/member/order/app/list")
    @FormUrlEncoded
    Observable<BaseResult<List<Order>>> getOrderList(@Field("receiptStatus") Integer receiptStatus,
                                                     @Field("type") Integer type);

    @POST("/api/order/get-order-info")
    @FormUrlEncoded
    Observable<BaseResult<List<Order>>> getOrderInfo(@Field("orderId") int id);

    @POST("/api/app/weixin/appPay")
    @FormUrlEncoded
    Observable<BaseResult<WxPayBean>> getWxPayInfo(@Field("orderNo") String orderNo);

    @POST("/api/app/alipay/appPay")
    @FormUrlEncoded
    Observable<BaseResult<String>> getAlipayInfo(@Field("orderNo") String orderNo);
    //</editor-folder >

    //<editor-folder desc="估分">
    @POST("/api/testEvaluation/v1/evaluation/list")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<Estimate>>> getEsList(@Field("subject_type_id") int subject_type_id,
                                                             @Field("n") int n);

    @POST("/api/examination/search-unit")
    @FormUrlEncoded
    Observable<BaseResult<List<String>>> getUnit(@Field("areaName") String areaName,
                                                 @Field("evaId") int evaId);

    @POST("/api/examination/area/list")
    @FormUrlEncoded
    Observable<BaseResult<List<String>>> getEstimatArea(@Field("evaId") int evaId);

    @POST("/api/examination/search-post-list-by-name")
    @FormUrlEncoded
    Observable<BaseResult<List<JobInfo>>> getJobs(@Field("areaName") String areaName,
                                                  @Field("unitName") String unitName,
                                                  @Field("evaId") int evaId);

    @POST("/api/testEvaluation/home/sign")
    @FormUrlEncoded
    Observable<BaseResult<String>> registEsTestMain(
            @Field("evaId") Integer evaId);


    @POST("/api/testEvaluation/v1/choose/post")
    @FormUrlEncoded
    Observable<BaseResult<Object>> chooseUnitDone(@Field("postId") Integer postId,
                                                  @Field("postName") String postName,
                                                  @Field("evaId") Integer evaId,
                                                  @Field("unitName") String unitName);

    @POST("/api/testEvaluation/testEvaluation/history")
    @FormUrlEncoded
    Observable<BaseResult<List<EstimateHis>>> getEsListHis(@Field("subjectTypeId") int moduleId);

    @POST("/api/testEvaluation/testEvaluation/post")
    @FormUrlEncoded
    Observable<BaseResult<Unit>> getUnitInfo(@Field("evaId") Integer evaId);

    @POST("/api/testEvaluation/testEvaluation/sort")
    @FormUrlEncoded
    Observable<BaseResult<SourtInfo>> getSourt(@Field("evaId") Integer evaId,
                                               @Field("n") int n,
                                               @Field("type") int type);


    //</editor-folder >

    //<editor-folder desc="提交答案">

    /**
     * 真题交卷
     *
     * @return
     */
    @POST("/api/test/paper/submit")
    Observable<BaseResult<String>> uploadSetAnswer(@Body UserAnswerPager userAnser);

    /**
     * 模考交卷
     *
     * @return
     */
    @POST("/api/model/competition/submit")
    Observable<BaseResult<String>> uploadMockAnwser(@Body UserAnswerPager userAnser);

    /**
     * 专项训练提交答案
     *
     * @return
     */
    @POST("/api/special/question/submit-exercise")
    Observable<BaseResult<String>> uploadSpecialAnswer(@Body UserAnswerPager userAnser);

    /**
     * 估分提交答案
     *
     * @return
     */
    @POST("/api/test/paper/evaluation/score/submit")
    Observable<BaseResult<UploadEstimateSucInfo>> uploadEstimateAnswer(@Body UserAnswerPager userAnser);

    /**
     * 估分提交答案V1
     *
     * @return
     */
    @POST("/api/test/paper/v1/evaluation/score/submit")
    Observable<BaseResult<UploadEstimateSucInfo>> uploadEstimateAnswerV1(@Body UserAnswerPager userAnser);
    //</editor-folder >

    //<editor-folder desc="生成试卷">

    /**
     * 创建专项试卷
     *
     * @return
     */
    @POST("/api/special/question/to-exercise-app")
    @FormUrlEncoded
    Observable<BaseResult<UserTestPaper>> createSpecialPager(
            @Field("papername") String papername,
            @Field("chapterId") Integer chapterId,
            @Field("sectionId") Integer sectionId,
            @Field("epId") Integer epId);

    /**
     * 模考生成试卷
     *
     * @param paperId
     * @return
     */
    @POST("/api/model/competition/start")
    @FormUrlEncoded
    Observable<BaseResult<UserTestPaper>> getMokPaper(@Field("id") int paperId);

    /**
     * 生成真题试卷
     */
    @POST("/api/test/paper/real/start-app")
    @FormUrlEncoded
    Observable<BaseResult<UserTestPaper>> getSetPaper(@Field("testPaperId") int testPaperId);

    /**
     * 生成自由组卷试卷
     *
     * @return
     */
    @POST("/api/free/question/start-free-question")
    @FormUrlEncoded
    Observable<BaseResult<Integer>> createFreedomPaper(@Field("moduleId") int modelId,
                                                       @Field("type") int type);


    /**
     * 估分生成试卷
     *
     * @return
     */
    @POST("/api/test/paper/v1/evaluation/start")
    @FormUrlEncoded
    Observable<BaseResult<UserTestPaper>> getEstimatePaper2(
            @Field("testPaperId") int testPaperId
            , @Field("memberEvaId") int memberEvaId);


    /**
     * 估分生成试卷
     *
     * @return
     */
    @POST("/api/test/paper/v1/evaluation/start")
    @FormUrlEncoded
    Observable<BaseResult<UserTestPaper>> getEstimatePaper(
            @Field("testPaperId") int testPaperId
            , @Field("memberEvaId") int evaId);


    //</editor-folder >
    //<editor-folder desc="拉题">


    /**
     * 获取专项练习题目ForApp
     *
     * @return
     */
    @POST("/api/special/question/exerciseForApp")
    @FormUrlEncoded
    Observable<BaseResult<List<QuestionParent>>> getSpecialQuestions(@Field("memberTestPaperId") int specialPagerId,
                                                                     @Field("type") String type);


    /**
     * 获取真题/题库/考前冲刺试卷开始答题ForAPp
     *
     * @return
     */
    @POST("/api/test/paper/app/do")
    @FormUrlEncoded
    Observable<BaseResult<List<QuestionParent>>> getSetQuestions(@Field("memberTestPaperId") int specialPagerId,
                                                                 @Field("type") String type);

    /**
     * 获取模考开始答题ForAPp
     *
     * @return
     */
    @POST("/api/model/competition/app/do")
    @FormUrlEncoded
    Observable<BaseResult<List<QuestionParent>>> getMokQuestions(@Field("memberTestPaperId") int specialPagerId,
                                                                 @Field("type") String type);

    /**
     * 估分拉题
     *
     * @return
     */
    @POST("/api/test/paper/evaluation/do")
    @FormUrlEncoded
    Observable<BaseResult<List<QuestionParent>>> getEstimateQuestions(@Field("testPaperId") int testPaperId
    );

    /**
     * 估分复盘拉题
     *
     * @return
     */
    @POST("/api/testEvaluation/testEvaluation/questions")
    @FormUrlEncoded
    Observable<BaseResult<List<QuestionParent>>> getEstimateQuestionsTb(@Field("testId") int testPaperId,
                                                                        @Field("evaId") int evaId);


    /**
     * 自由组卷拉题
     *
     * @return
     */
    @POST("/api/free/question/select-free-question")
    @FormUrlEncoded
    Observable<BaseResult<List<FreedomGroup>>> getFreedomQuestion(@Field("memberTestPaperId") int memberTestPaperId);


    //</editor-folder >


    /**
     * 简历保存
     *
     * @param resume
     * @return
     */
    @POST("/api/memberResume/save-resume")
    Observable<BaseResult<String>> saveResume(@Body Resume resume);

    /**
     * 获取简历
     *
     * @return
     */
    @POST("/api/memberResume/get-resume")
    Observable<BaseResult<Resume>> getResume();

    /**
     * 获取专业
     *
     * @param edu
     * @param majorTitle
     * @return
     */
    @POST("/api/memberResume/get-major")
    @FormUrlEncoded
    Observable<BaseResult<String>> getMajor(@Field("edu") Integer edu,
                                            @Field("majorName") String majorTitle);

    @POST("/api/order/get-coupon-app")
    @FormUrlEncoded
    Observable<BaseResult<List<Coupon>>> getCoupons(@Field("type") Integer type,
                                                    @Field("status") Integer statue,
                                                    @Field("useType") Integer useType,
                                                    @Field("subjectTypeId") Integer subjectTypeId);

    /**
     * 我购买的题集
     *
     * @param n
     * @return
     */
    @POST("/api/topic/member-topic-list")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<PaperSet>>> getMyPauchesPaperSet(@Field("n") int n);


    /**
     * 我收藏的题集
     *
     * @param moduleId
     * @param n
     * @return
     */
    @POST("/api/topic/member-topic-collect-list")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<PaperSet>>> getMyCollectPaperSet(@Field("moduleId") int moduleId,
                                                                        @Field("n") int n);


    /**
     * 用户信息
     *
     * @return
     */
    @POST("/api/member/get-member-info")
    Observable<BaseResult<UserInfo>> getMemberInfo();

    /**
     * 首页广告
     *
     * @return
     */
    @POST("/api/index/get-home-cd")
    Observable<BaseResult<MainAdv>> getMainAdv();

    /**
     * 版本检查
     *
     * @return
     */
    @POST("/api/appRelease/get/last")
    Observable<BaseResult<AppVersionInfo>> getVersion();

    /**
     * 规则
     * 1:分享
     *
     * @return
     */
    @POST("/api/share/share/rule")
    @FormUrlEncoded
    Observable<BaseResult<Rule>> getRules(@Field("type") int type);

    @POST("/api/memberLearnTime/get-learn-detail")
    @FormUrlEncoded
    Observable<BaseResult<TodayQuestionInfo>> getTodayQuestionInfo(@Field("moduleId") int moduleId,
                                                                   @Field("n") int n,
                                                                   @Field("type") int i,
                                                                   @Field("targetDate") String targetDate);

    @POST("/api/memberLearnTime/get-learn-detail")
    @FormUrlEncoded
    Observable<BaseResult<TodayCourseInfo>> getTodayCourseInfo(@Field("moduleId") int moduleId,
                                                               @Field("n") int n,
                                                               @Field("type") int i,
                                                               @Field("targetDate") String targetDate);

    /**
     * 添加证书
     *
     * @param name
     * @return
     */
    @POST("/api/memberResume/add-cert")
    @FormUrlEncoded
    Observable<BaseResult<String>> saveCert(@Field("certName") String name);

    @POST("/api/memberResume/del-cert")
    @FormUrlEncoded
    Observable<BaseResult<String>> deleteCert(@Field("certId") int id);

    @POST("/api/memberResume/get-cert")
    Observable<BaseResult<List<Cert>>> queryCert();

    /**
     * 我的评论
     *
     * @param questionId
     * @return
     */
    @POST("/api/member/notes/get-by-question")
    @FormUrlEncoded
    Observable<BaseResult<QuestionNote>> getMyQuestionNote(@Field("questionId") int questionId,
                                                           @Field("n") int n);


    /**
     * 反馈
     * subtype: 1
     * type: 1
     * content: 1111
     * objId: 192357
     *
     * @return
     */
    @POST("/api/member/submit-feedback")
    @FormUrlEncoded
    Observable<BaseResult<String>> feedback(@Field("subtype") Integer subtype,
                                            @Field("type") Integer type,
                                            @Field("content") String content,
                                            @Field("objId") Integer objId);

    /**
     * 开屏广告
     */
    @POST("/api/appHomeImage/get-home-img")
    Observable<BaseResult<ArrayList<WelcomeBean>>> getLauncherAdv();

    /**
     * 删除我的笔记
     * TODO
     *
     * @param notesId
     * @return
     */
    @POST("/api/member/notes/remove")
    @FormUrlEncoded
    Observable<BaseResult<String>> deleteNote(@Field("notesId") int notesId);

    /**
     * 协议班每日状态
     *
     * @param date
     * @return
     */
    @POST("/api/member/get-agreement-learn-process-month")
    @FormUrlEncoded
    Observable<BaseResult<List<MouthInfo>>> getMouthInfos(@Field("targetDate") String date);

    @POST("/api/examination/del-notice-history")
    @FormUrlEncoded
    Observable<BaseResult<ListWithPage<JobHis>>> deleteHis(@Field("historyId") int historyId);

}
